home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Tele
/
C
/
Comet2.1.3.cpt
/
Worksheet
< prev
next >
Wrap
Text File
|
1991-11-07
|
17KB
|
318 lines
This is an MPW Worksheet for Comet; use the provided UserStartup
to automatically run AztecStartup.
Comet source organization:
Mostly as a result of historical evolution, the resources to make Comet
are haphazardly split between several folders. The top level of the
hierarchy is assumed to be "{Boot}src:".
Folder:
Comet: the bulk of the code
emlib: various other code and resources
include: most of the include files
azInclude: files to place in the Aztec azInclude directory.
quickdraw.h was modified to support Color QuickDraw calls
for older versions of Aztec, other files contain MacTCP includes
3270XCMD: a DRVR for controlling Comet through the hyperface.c
interface; UNUSED with multiple windows but could be fixed to work
NOTE: this is written for MPW C, so AztecStartup should
not be executed before trying to compile this.
Probably the most confusing thing in Comet is the getcontext() and
setcontext() calls in main.c, which maintain globals corresponding to
the current input/output window/session's state. "emdp" is the current window
selected for input/output; "keydp" is the topmost window.
This was done to handle multiple
windows without completely rewriting the fast-drawing assembly code
in zap.asm, which has no spare registers to save the current window
structure pointer (almost invariably declared as "twp"). Various other
variables are declared as globals also, in the hope of avoiding the
lousy code generated by the compiler for structure/pointer references
(Aztec up to 3.6 invariably reloads the pointer, so referencing off
A5 and loading/saving globals gives code that is faster
and more compact--the hazard is that you must be careful not
to modify/use the *window structure's variable* when it is in use
as a global.
NOTE that when you add variables to the window structure in em.h,
you must recompile main.c also, so the structure is allocated enough
memory.
Next most fearsome is the MacTCP interface. Problems still exist
with Asynchronous sends of whole 3270 screens, which MacTCP will
send but *will not* resend. It's unclear whether the interface
can be fixed so that MacTCP will be happier. MacTCP is not a happy
piece of work to begin with...
#useful search routines
grep SENDBUFSIZE ::include:≈.h
Set Exit 0
grep 'cntl.h' ::emlib:≈.c
grep 'cntl.h' ::Comet:≈.c
Set Exit 1
#make em library
cd {boot}src:emlib:
Azmake LIB=hd:mpw:azLib: CFLAGS='-N ' em.lib > makeout
makeout
#make 2.1 text window version
cd {boot}src:Comet:
Azmake -f makefile2.1 LIB=hd:mpw:azLib: CFLAGS='-N -DMACTCP' > makeout
makeout
# back up Comet onto MacII 40MB drive
set exit 0
duplicate -y hd:src:Comet:Comet21 hde:src:Comet:Comet21
duplicate -y hd:src:Comet:Comet21.dbg hde:src:Comet:Comet21.dbg
echo "#Comet backup" > backuprecord9
echo "#`date`" >> backuprecord9
backup -a -c -n -p -t TEXT -from hd:src:include: -to hde:src:include: >> backuprecord9
backup -a -c -n -p -t TEXT -from hd:src:Comet: -to hde:src:Comet: >> backuprecord9
backup -a -n -p -t rsrc -from hd:src:Comet: -to hde:src:Comet: >> backuprecord9
backup -a -c -n -p -t TEXT -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
backup -a -n -p -t rsrc -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
backup -a -n -p -t FFIL -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
backup -a -n -p -t PNTG -from hd:src:emlib: -to hde:src:emlib: >> backuprecord9
backuprecord9
# backup Comet source onto floppies named "Comet"
NewFolder Comet:emlib:
NewFolder Comet:include:
duplicate -y hd:src:Comet:Comet21 'Comet':Comet21
duplicate -y hd:src:Comet:Comet21.dbg 'Comet':Comet21.dbg
echo "#Comet backup" > junk
echo "#`date`" >> junk
backup -a -c -d -n -p -t TEXT -from hd:src:include: -to 'Comet':include: > junk
backup -a -c -d -n -p -t TEXT -from hd:src:emlib: -to 'Comet':emlib: >> junk
backup -a -d -n -p -t rsrc -from hd:src:emlib: -to 'Comet':emlib: >> junk
backup -a -d -n -p -t FFIL -from hd:src:emlib: -to 'Comet':emlib: >> junk
backup -a -d -n -p -t PNTG -from hd:src:emlib: -to 'Comet':emlib: >> junk
junk
NewFolder Comet:Comet:
backup -a -c -d -n -p -t TEXT -from hd:src:Comet: -to 'Comet':Comet: > junk2
backup -a -d -n -p -t rsrc -from hd:src:Comet: -to 'Comet':Comet: >> junk2
junk2
Here follow file listings with one-liners describing the contents:
cd hde:Comet2.1.3:
files -l
Name Type Crtr Size Flags Last-Mod-Date Creation-Date
-------------------- ---- ---- ------ ---------- ----------------- -----------------
azInclude Fldr Fldr 31K lvbspoImad 10/25/91 4:17 PM 10/25/91 4:16 PM
Comet Fldr Fldr 929K lvbspoImad 11/7/91 3:59 PM 11/7/91 2:58 PM
emlib Fldr Fldr 385K lvbspoImad 11/7/91 3:45 PM 11/7/91 2:58 PM
formerly the "emulator" library; placed in MPW:azLib:
include Fldr Fldr 112K lvbspoImad 11/7/91 4:00 PM 11/7/91 2:58 PM
resize TEXT MPS 2K lvbspoImad 3/27/91 9:54 AM 3/10/89 3:13 PM
handy script to resize a window
UserStartup TEXT MPS 3K lvbspOImad 11/7/91 3:30 PM 7/20/87 12:00 PM
Worksheet TEXT MPS 16K lvbspOImad 11/7/91 4:22 PM 12/18/87 12:00 PM
This Worksheet
emlib:
files -l
Name Type Crtr Size Flags Last-Mod-Date Creation-Date
-------------------- ---- ---- ------ ---------- ----------------- -----------------
ascii.rsrc rsrc ???? 2K lvbspoImad 5/31/91 3:49 PM 6/1/88 2:54 PM
resources specific to ASCII telnet
basic.rsrc rsrc CUTE 88K lvbspoImad 7/26/91 1:01 PM 2/19/91 10:48 AM
basic resource file: dialogs, etc.
bigfont.dam FFIL aca4 67K lvbspoImad 7/24/91 1:44 PM 3/3/91 11:24 PM
A Fontastic file containing the fonts
blank.asm TEXT dumv 3K lvbspoImad 6/26/90 1:27 AM 11/8/88 5:58 PM
UNUSED code to blank emulator screen areas quickly
comet-fonts FFIL DMOV 62K lvbspoImad 7/24/91 1:44 PM 5/28/91 4:06 PM
DAMover copy of the Comet fonts
h19key.c TEXT ???? 10K lvbspoImad 7/31/91 10:48 AM 8/10/86 5:15 AM
code which drives a 25th line for input
ibm.rsrc rsrc ???? 3K lvbspoImad 7/22/91 1:05 PM 6/1/88 2:54 PM
resources specific to IBM 3270
icon.pict PNTG PANT 3K lvbspoImad 3/24/89 1:54 PM 3/23/89 2:15 PM
icon.rsrc rsrc 1K lvbspoImad 3/28/86 4:36 PM 2/24/86 2:37 PM
Comet icon
key.c TEXT ???? 39K lvbspoImad 8/2/91 2:06 PM 8/13/86 1:36 AM
code for keymapping, manipulating key macro queue
keypads PNTG PANT 20K lvbspoImad 8/11/90 1:27 PM 4/12/89 3:04 PM
pictures of the keypads
macinit.c TEXT ???? 4K lvbspoImad 6/25/91 1:59 PM 10/23/86 6:43 AM
initialize most global Mac Managers
macro.c TEXT ???? 44K lvbspoImad 7/25/91 12:51 PM 10/2/86 12:37 AM
code to manage dialog for entering and dumping key macros
makefile TEXT ???? 2K lvbspoImad 6/20/91 4:35 PM 8/13/86 2:28 AM
makeout TEXT MPS 2K lvbspoImad 8/2/91 2:07 PM 6/12/90 7:11 PM
prettywind.c TEXT ???? 17K lvbspoImad 4/1/91 3:34 PM 10/8/86 1:58 AM
code to draw window frames, counters
printf.c TEXT ???? 7K lvbspoImad 10/28/91 7:18 PM 9/22/86 4:52 AM
icky printf routines deriving from PC-IP: WARNING may not
act like the printf to which you are accustomed!
The %A internet address string interpretation seems to be the
only benefit from using this...
setscript.asm TEXT MPS 3K lvbspoImad 2/22/91 10:14 AM 6/16/90 11:05 AM
assembly language interface to Mac Script Mgr to set Script
shrink.pict PNTG PANT 2K lvbspoImad 3/23/89 3:56 PM 3/23/89 3:56 PM
tape.pict PNTG MPNT 2K lvbspoImad 4/1/91 3:02 PM 4/1/91 3:02 PM
more pictures which are pasted into the .rsrc files
telnet.rsrc rsrc ???? 4K lvbspoImad 7/1/91 2:09 PM 4/12/88 2:28 PM
resources specific to Telnet
cd ::Comet
files -l
Name Type Crtr Size Flags Last-Mod-Date Creation-Date
-------------------- ---- ---- ------ ---------- ----------------- -----------------
!changes TEXT MPS 43K lvbspoImad 11/7/91 2:32 PM 8/31/90 11:04 AM
!TODO TEXT MPS 11K lvbspoImad 10/30/91 4:58 PM 10/8/91 11:25 AM
3270com.c TEXT dumv 29K lvbspoImad 8/22/91 1:51 PM 5/9/88 1:48 PM
the 3270 command parser
3270token.c TEXT ???? 20K lvbspoImad 7/26/91 10:56 AM 8/25/86 4:48 AM
interprets 3270 keyboard macros
asciidraw.c TEXT MPS 30K lvbspoImad 7/8/91 1:39 PM 6/11/90 1:51 PM
draws/updates Heath-19 and VT100 screens, contains common functions
asciitoken.c TEXT ???? 17K lvbspoImad 8/21/91 1:35 PM 10/6/86 2:03 AM
interprets ASCII keyboard macros
Comet2.1.r TEXT ???? 2K lvbspoImad 9/4/91 2:56 PM 8/15/86 2:56 AM
Redit file which controls the assembly of the Comet application
CometCopy.c TEXT dumv 2K lvbspoImad 4/25/91 4:13 PM 8/14/90 11:59 AM
Copyright notice
config.c TEXT ???? 34K lvbspoImad 11/7/91 2:30 PM 9/26/86 1:12 AM
gets configuration from documents, and globals from "Comet Default"
dialog.c TEXT MPS 68K lvbspoImad 10/22/91 3:08 PM 2/16/91 12:57 PM
almost all of the dialogs
DNR.c TEXT MPS 7K lvbspoImad 5/23/91 12:01 PM 11/14/88 3:45 PM
sample MacTCP DNR code
emcursor.c TEXT ???? 36K lvbspoImad 10/31/91 4:50 PM 12/15/86 9:22 AM
cursor tracking/selection for all windows
event.c TEXT ???? 69K lvbspoImad 10/22/91 3:13 PM 12/12/86 4:02 PM
almost all Mac-related routines, including the main event loop
ft.c TEXT dumv 23K lvbspoImad 4/23/91 12:50 PM 2/26/88 7:28 PM
3270-specific file transfer, WARNING: may induce brain damage!
gethost.c TEXT ???? 18K lvbspoImad 9/25/91 2:27 PM 10/7/86 12:01 AM
parses host strings, calls DNR
h19.c TEXT dumv 16K lvbspoImad 10/17/91 5:13 PM 4/7/89 7:01 PM
the Heath-19 emulator
hyperface.c TEXT MPS 10K lvbspoImad 9/13/90 4:39 PM 11/17/89 2:46 PM
UNUSED interface for Comet driver.
icon.rsrc rsrc 1K lvbspoImad 12/20/90 9:08 AM 2/24/86 2:37 PM
the Comet icon
mactcp.c TEXT MPS 32K lvbspoImad 8/16/91 11:57 AM 11/16/88 1:35 PM
mactcp.h TEXT MPS 2K lvbspoImad 5/1/91 3:01 PM 4/3/90 2:38 PM
the MacTCP interface code
main.c TEXT ???? 40K lvbspoImad 10/22/91 3:10 PM 12/12/86 4:01 PM
top-level connection creation & service loops
makefile2.1 TEXT ???? 6K lvbspoImad 10/22/91 1:44 PM 9/29/86 1:35 AM
the makefile
makeout TEXT MPS 2K lvbspoImad 11/7/91 2:48 PM 6/24/91 5:52 PM
output of makefile directed into this file for execution
menu.c TEXT MPS 69K lvbspoImad 10/30/91 4:35 PM 11/30/89 5:18 PM
menudefs.h TEXT dumv 8K lvbspoImad 10/30/91 3:56 PM 8/11/87 4:15 PM
controls display and selection of menu items
net_utils.asm TEXT ???? 3K lvbspoImad 12/13/89 3:46 PM 4/11/86 4:18 PM
Internet checksum, byteswapping
nnr.c TEXT dumv 3K lvbspoImad 9/3/91 4:09 PM 2/12/87 6:09 AM
UNUSED runs dialog when connection experiences resends
screen.c TEXT dumv 42K lvbspoImad 9/4/91 1:39 PM 10/21/87 2:47 PM
master screen event handler, also 3270 screen drawing
scrinit.c TEXT ???? 39K lvbspoImad 7/8/91 2:03 PM 5/5/86 5:02 PM
window creation, screen management; gets screen RAM locations for zap.asm
serial.c TEXT MPS 15K lvbspoImad 10/30/91 3:58 PM 6/22/90 5:37 PM
serial connection code
telnet.c TEXT ???? 16K lvbspoImad 9/25/91 1:10 PM 8/10/86 5:36 AM
Telnet layer
textedit.c TEXT MPS 26K lvbspoImad 6/25/91 1:25 PM 10/24/91 9:34 AM
controls TextEdit window (.edit)
tftp.h TEXT ???? 8K lvbspoImad 2/11/91 9:10 PM 4/14/86 9:36 AM
tftp_common.c TEXT MPS 4K lvbspoImad 9/26/90 3:08 PM 7/29/90 4:23 PM
tftp_srv.c TEXT ???? 14K lvbspoImad 5/6/91 1:38 PM 10/24/86 3:33 AM
tftp_util.c TEXT ???? 19K lvbspoImad 2/11/91 9:02 PM 12/15/86 10:43 AM
TFTP files, _common is UNUSED
timer.c TEXT MPS 13K lvbspoImad 7/26/90 12:23 PM 7/24/89 2:50 PM
manages timing for macros, etc.
tninit.asm TEXT MPS 2K lvbspoImad 6/13/90 10:30 AM 11/28/88 10:11 AM
initializes A5
token.c TEXT ???? 13K lvbspoImad 10/30/91 4:34 PM 10/6/86 2:03 AM
master token (key macro) service loop, higher-level routines
util.c TEXT ???? 7K lvbspoImad 2/16/91 1:10 PM 8/27/86 1:07 AM
misc routines, including queueing
vt100.c TEXT dumv 32K lvbspoImad 7/2/91 12:13 PM 6/22/87 4:18 PM
vt100 emulator
xlate.h TEXT ???? 22K lvbspoImad 7/24/91 11:54 AM 1/7/91 5:02 PM
3270-ASCII translate tables
zap.asm TEXT ???? 57K lvbspOImad 2/7/91 11:20 AM 4/24/86 8:45 AM
Assembly language routines for faster screen drawing
cd ::include
files -l
Name Type Crtr Size Flags Last-Mod-Date Creation-Date
-------------------- ---- ---- ------ ---------- ----------------- -----------------
3270.h TEXT ???? 8K lvbspoImad 7/24/91 2:03 PM 8/29/86 2:36 AM
3270vars.h TEXT ???? 3K lvbspoImad 6/13/90 8:31 PM 7/23/86 4:55 AM
cntl.h TEXT ???? 2K lvbspoImad 10/12/89 2:56 PM 4/11/86 3:51 PM
cntldefs.h TEXT ???? 2K lvbspoImad 7/21/90 2:48 PM 8/5/86 2:25 AM
config.h TEXT ???? 5K lvbspoImad 11/7/91 2:32 PM 8/26/86 2:55 AM
custom.h TEXT ???? 4K lvbspoImad 4/15/88 2:08 PM 7/17/86 2:10 AM
em.h TEXT ???? 28K lvbspOImad 10/22/91 3:11 PM 4/11/86 3:52 PM
contains the master window structure definition, used universally
emdefs.h TEXT ???? 6K lvbspoImad 6/26/91 4:10 PM 4/11/86 3:57 PM
ft.h TEXT ???? 4K lvbspoImad 6/20/91 2:20 PM 8/6/87 3:09 PM
h19.h TEXT ???? 3K lvbspoImad 10/23/91 10:15 AM 5/21/86 6:35 PM
key.h TEXT ???? 3K lvbspoImad 8/3/90 1:40 PM 8/13/86 1:38 AM
macdefs.h TEXT ???? 3K lvbspoImad 12/19/91 2:16 PM 8/22/86 1:48 AM
Mac low-memory globals
net.h TEXT ???? 6K lvbspoImad 7/26/90 2:45 PM 4/11/86 4:02 PM
notice.h TEXT ???? 3K lvbspoImad 11/7/91 3:17 PM 4/11/86 4:10 PM
q.h TEXT ???? 5K lvbspoImad 10/4/89 2:34 PM 8/13/86 9:28 AM
rcodes.h TEXT ???? 6K lvbspoImad 10/17/91 5:37 PM 10/6/86 2:00 AM
token/key macro codes defined
resdefs.h TEXT ???? 4K lvbspoImad 6/24/91 6:50 PM 8/18/86 4:02 AM
important resource numbers defined here
task.h TEXT ???? 3K lvbspoImad 5/11/90 5:20 PM 4/11/86 4:14 PM
telnet.h TEXT ???? 5K lvbspoImad 3/28/91 9:12 AM 7/23/86 11:52 PM
tftp.defs TEXT ???? 2K lvbspoImad 4/11/86 4:15 PM 4/11/86 4:15 PM
tftp.h TEXT ???? 2K lvbspoImad 7/29/90 5:26 PM 4/11/86 4:15 PM
timer.h TEXT ???? 3K lvbspoImad 1/31/90 4:24 PM 4/11/86 4:15 PM
util.h TEXT dumv 2K lvbspoImad 4/14/88 2:44 PM 4/14/88 2:44 PM
cd ::azInclude
files -l
Name Type Crtr Size Flags Last-Mod-Date Creation-Date
-------------------- ---- ---- ------ ---------- ----------------- -----------------
quickdraw.h TEXT ???? 15K lvbspoImad 7/10/91 1:19 PM 6/10/88 2:04 PM
Color QuickDraw and other calls may be needed for older Aztec C versions
GetMyIPAddr.h TEXT MPS 1K lvbspoImad 3/28/89 12:00 PM 3/28/89 12:00 PM
MacTCPCommonTypes.h TEXT MPS 5K lvbspoImad 10/4/89 2:26 PM 3/28/89 12:00 PM
TCPPB.h TEXT MPS 7K lvbspoImad 8/21/91 1:51 PM 3/28/89 12:00 PM
UDPPB.h TEXT MPS 3K lvbspoImad 10/4/89 2:19 PM 3/28/89 12:00 PM
MacTCP defines modified for non-ANSI C Aztec versions